3.245 \(\int \cos ^3(e+f x) (a+b \sec ^2(e+f x))^{3/2} \, dx\)

Optimal. Leaf size=241 \[ \frac {a \sin (e+f x) \cos ^2(e+f x) \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )}}{3 f}-\frac {b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} F\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right )}{3 f \left (-a \sin ^2(e+f x)+a+b\right )}+\frac {2 (a+2 b) \sqrt {\cos ^2(e+f x)} \sqrt {\sec ^2(e+f x) \left (-a \sin ^2(e+f x)+a+b\right )} E\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right )}{3 f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}} \]

[Out]

1/3*a*cos(f*x+e)^2*sin(f*x+e)*(sec(f*x+e)^2*(a+b-a*sin(f*x+e)^2))^(1/2)/f+2/3*(a+2*b)*EllipticE(sin(f*x+e),(a/
(a+b))^(1/2))*(cos(f*x+e)^2)^(1/2)*(sec(f*x+e)^2*(a+b-a*sin(f*x+e)^2))^(1/2)/f/(1-a*sin(f*x+e)^2/(a+b))^(1/2)-
1/3*b*(a+b)*EllipticF(sin(f*x+e),(a/(a+b))^(1/2))*(cos(f*x+e)^2)^(1/2)*(sec(f*x+e)^2*(a+b-a*sin(f*x+e)^2))^(1/
2)*(1-a*sin(f*x+e)^2/(a+b))^(1/2)/f/(a+b-a*sin(f*x+e)^2)

________________________________________________________________________________________

Rubi [A]  time = 0.42, antiderivative size = 294, normalized size of antiderivative = 1.22, number of steps used = 9, number of rules used = 9, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {4148, 6722, 1974, 416, 524, 426, 424, 421, 419} \[ \frac {a \sin (e+f x) \cos ^2(e+f x) \sqrt {-a \sin ^2(e+f x)+a+b} \sqrt {a+b \sec ^2(e+f x)}}{3 f \sqrt {a \cos ^2(e+f x)+b}}-\frac {b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \sqrt {a+b \sec ^2(e+f x)} F\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right )}{3 f \sqrt {-a \sin ^2(e+f x)+a+b} \sqrt {a \cos ^2(e+f x)+b}}+\frac {2 (a+2 b) \sqrt {\cos ^2(e+f x)} \sqrt {-a \sin ^2(e+f x)+a+b} \sqrt {a+b \sec ^2(e+f x)} E\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right )}{3 f \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}} \sqrt {a \cos ^2(e+f x)+b}} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^3*(a + b*Sec[e + f*x]^2)^(3/2),x]

[Out]

(a*Cos[e + f*x]^2*Sqrt[a + b*Sec[e + f*x]^2]*Sin[e + f*x]*Sqrt[a + b - a*Sin[e + f*x]^2])/(3*f*Sqrt[b + a*Cos[
e + f*x]^2]) + (2*(a + 2*b)*Sqrt[Cos[e + f*x]^2]*EllipticE[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[a + b*Sec[e +
 f*x]^2]*Sqrt[a + b - a*Sin[e + f*x]^2])/(3*f*Sqrt[b + a*Cos[e + f*x]^2]*Sqrt[1 - (a*Sin[e + f*x]^2)/(a + b)])
 - (b*(a + b)*Sqrt[Cos[e + f*x]^2]*EllipticF[ArcSin[Sin[e + f*x]], a/(a + b)]*Sqrt[a + b*Sec[e + f*x]^2]*Sqrt[
1 - (a*Sin[e + f*x]^2)/(a + b)])/(3*f*Sqrt[b + a*Cos[e + f*x]^2]*Sqrt[a + b - a*Sin[e + f*x]^2])

Rule 416

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1)*(c
 + d*x^n)^(q - 1))/(b*(n*(p + q) + 1)), x] + Dist[1/(b*(n*(p + q) + 1)), Int[(a + b*x^n)^p*(c + d*x^n)^(q - 2)
*Simp[c*(b*c*(n*(p + q) + 1) - a*d) + d*(b*c*(n*(p + 2*q - 1) + 1) - a*d*(n*(q - 1) + 1))*x^n, x], x], x] /; F
reeQ[{a, b, c, d, n, p}, x] && NeQ[b*c - a*d, 0] && GtQ[q, 1] && NeQ[n*(p + q) + 1, 0] &&  !IGtQ[p, 1] && IntB
inomialQ[a, b, c, d, n, p, q, x]

Rule 419

Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> Simp[(1*EllipticF[ArcSin[Rt[-(d/c),
2]*x], (b*c)/(a*d)])/(Sqrt[a]*Sqrt[c]*Rt[-(d/c), 2]), x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] &
& GtQ[a, 0] &&  !(NegQ[b/a] && SimplerSqrtQ[-(b/a), -(d/c)])

Rule 421

Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> Dist[Sqrt[1 + (d*x^2)/c]/Sqrt[c + d*
x^2], Int[1/(Sqrt[a + b*x^2]*Sqrt[1 + (d*x^2)/c]), x], x] /; FreeQ[{a, b, c, d}, x] &&  !GtQ[c, 0]

Rule 424

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[(Sqrt[a]*EllipticE[ArcSin[Rt[-(d/c)
, 2]*x], (b*c)/(a*d)])/(Sqrt[c]*Rt[-(d/c), 2]), x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[
a, 0]

Rule 426

Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Dist[Sqrt[a + b*x^2]/Sqrt[1 + (b*x^2)/a]
, Int[Sqrt[1 + (b*x^2)/a]/Sqrt[c + d*x^2], x], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] &&  !GtQ
[a, 0]

Rule 524

Int[((e_) + (f_.)*(x_)^(n_))/(Sqrt[(a_) + (b_.)*(x_)^(n_)]*Sqrt[(c_) + (d_.)*(x_)^(n_)]), x_Symbol] :> Dist[f/
b, Int[Sqrt[a + b*x^n]/Sqrt[c + d*x^n], x], x] + Dist[(b*e - a*f)/b, Int[1/(Sqrt[a + b*x^n]*Sqrt[c + d*x^n]),
x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&  !(EqQ[n, 2] && ((PosQ[b/a] && PosQ[d/c]) || (NegQ[b/a] && (PosQ[
d/c] || (GtQ[a, 0] && ( !GtQ[c, 0] || SimplerSqrtQ[-(b/a), -(d/c)]))))))

Rule 1974

Int[(u_)^(p_.)*(v_)^(q_.), x_Symbol] :> Int[ExpandToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{p, q}, x] &&
 BinomialQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] &&  !BinomialMatchQ[{u, v}, x]

Rule 4148

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_), x_Symbol] :> With[{ff = Fr
eeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[(a + b/(1 - ff^2*x^2)^(n/2))^p/(1 - ff^2*x^2)^((m + 1)/2), x
], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n/2] &&  !IntegerQ
[p]

Rule 6722

Int[(u_.)*((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[(a + b*v^n)^FracPart[p]/(v^(n*FracPart[p])*(b + a/
v^n)^FracPart[p]), Int[u*v^(n*p)*(b + a/v^n)^p, x], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[p] && ILtQ[n, 0] &
& BinomialQ[v, x] &&  !LinearQ[v, x]

Rubi steps

\begin {align*} \int \cos ^3(e+f x) \left (a+b \sec ^2(e+f x)\right )^{3/2} \, dx &=\frac {\operatorname {Subst}\left (\int \left (1-x^2\right ) \left (a+\frac {b}{1-x^2}\right )^{3/2} \, dx,x,\sin (e+f x)\right )}{f}\\ &=\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\left (b+a \left (1-x^2\right )\right )^{3/2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {b+a \cos ^2(e+f x)}}\\ &=\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\left (a+b-a x^2\right )^{3/2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {b+a \cos ^2(e+f x)}}\\ &=\frac {a \cos ^2(e+f x) \sqrt {a+b \sec ^2(e+f x)} \sin (e+f x) \sqrt {a+b-a \sin ^2(e+f x)}}{3 f \sqrt {b+a \cos ^2(e+f x)}}-\frac {\left (\sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {(a+b) (a-3 (a+b))+2 a (a+2 b) x^2}{\sqrt {1-x^2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{3 f \sqrt {b+a \cos ^2(e+f x)}}\\ &=\frac {a \cos ^2(e+f x) \sqrt {a+b \sec ^2(e+f x)} \sin (e+f x) \sqrt {a+b-a \sin ^2(e+f x)}}{3 f \sqrt {b+a \cos ^2(e+f x)}}-\frac {\left (b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {a+b-a x^2}} \, dx,x,\sin (e+f x)\right )}{3 f \sqrt {b+a \cos ^2(e+f x)}}+\frac {\left (2 (a+2 b) \sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {a+b-a x^2}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{3 f \sqrt {b+a \cos ^2(e+f x)}}\\ &=\frac {a \cos ^2(e+f x) \sqrt {a+b \sec ^2(e+f x)} \sin (e+f x) \sqrt {a+b-a \sin ^2(e+f x)}}{3 f \sqrt {b+a \cos ^2(e+f x)}}+\frac {\left (2 (a+2 b) \sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)} \sqrt {a+b-a \sin ^2(e+f x)}\right ) \operatorname {Subst}\left (\int \frac {\sqrt {1-\frac {a x^2}{a+b}}}{\sqrt {1-x^2}} \, dx,x,\sin (e+f x)\right )}{3 f \sqrt {b+a \cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}-\frac {\left (b (a+b) \sqrt {\cos ^2(e+f x)} \sqrt {a+b \sec ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-x^2} \sqrt {1-\frac {a x^2}{a+b}}} \, dx,x,\sin (e+f x)\right )}{3 f \sqrt {b+a \cos ^2(e+f x)} \sqrt {a+b-a \sin ^2(e+f x)}}\\ &=\frac {a \cos ^2(e+f x) \sqrt {a+b \sec ^2(e+f x)} \sin (e+f x) \sqrt {a+b-a \sin ^2(e+f x)}}{3 f \sqrt {b+a \cos ^2(e+f x)}}+\frac {2 (a+2 b) \sqrt {\cos ^2(e+f x)} E\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right ) \sqrt {a+b \sec ^2(e+f x)} \sqrt {a+b-a \sin ^2(e+f x)}}{3 f \sqrt {b+a \cos ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}-\frac {b (a+b) \sqrt {\cos ^2(e+f x)} F\left (\sin ^{-1}(\sin (e+f x))|\frac {a}{a+b}\right ) \sqrt {a+b \sec ^2(e+f x)} \sqrt {1-\frac {a \sin ^2(e+f x)}{a+b}}}{3 f \sqrt {b+a \cos ^2(e+f x)} \sqrt {a+b-a \sin ^2(e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 1.88, size = 179, normalized size = 0.74 \[ \frac {\cos (e+f x) \sqrt {a+b \sec ^2(e+f x)} \left (4 \sqrt {2} \left (a^2+3 a b+2 b^2\right ) \sqrt {\frac {a \cos (2 (e+f x))+a+2 b}{a+b}} E\left (e+f x\left |\frac {a}{a+b}\right .\right )+a \sin (2 (e+f x)) (a \cos (2 (e+f x))+a+2 b)-2 \sqrt {2} b (a+b) \sqrt {\frac {a \cos (2 (e+f x))+a+2 b}{a+b}} F\left (e+f x\left |\frac {a}{a+b}\right .\right )\right )}{6 f (a \cos (2 (e+f x))+a+2 b)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]^3*(a + b*Sec[e + f*x]^2)^(3/2),x]

[Out]

(Cos[e + f*x]*Sqrt[a + b*Sec[e + f*x]^2]*(4*Sqrt[2]*(a^2 + 3*a*b + 2*b^2)*Sqrt[(a + 2*b + a*Cos[2*(e + f*x)])/
(a + b)]*EllipticE[e + f*x, a/(a + b)] - 2*Sqrt[2]*b*(a + b)*Sqrt[(a + 2*b + a*Cos[2*(e + f*x)])/(a + b)]*Elli
pticF[e + f*x, a/(a + b)] + a*(a + 2*b + a*Cos[2*(e + f*x)])*Sin[2*(e + f*x)]))/(6*f*(a + 2*b + a*Cos[2*(e + f
*x)]))

________________________________________________________________________________________

fricas [F]  time = 0.48, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \cos \left (f x + e\right )^{3} \sec \left (f x + e\right )^{2} + a \cos \left (f x + e\right )^{3}\right )} \sqrt {b \sec \left (f x + e\right )^{2} + a}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^3*(a+b*sec(f*x+e)^2)^(3/2),x, algorithm="fricas")

[Out]

integral((b*cos(f*x + e)^3*sec(f*x + e)^2 + a*cos(f*x + e)^3)*sqrt(b*sec(f*x + e)^2 + a), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \cos \left (f x + e\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^3*(a+b*sec(f*x+e)^2)^(3/2),x, algorithm="giac")

[Out]

integrate((b*sec(f*x + e)^2 + a)^(3/2)*cos(f*x + e)^3, x)

________________________________________________________________________________________

maple [C]  time = 1.71, size = 5069, normalized size = 21.03 \[ \text {output too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^3*(a+b*sec(f*x+e)^2)^(3/2),x)

[Out]

result too large to display

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (f x + e\right )^{2} + a\right )}^{\frac {3}{2}} \cos \left (f x + e\right )^{3}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^3*(a+b*sec(f*x+e)^2)^(3/2),x, algorithm="maxima")

[Out]

integrate((b*sec(f*x + e)^2 + a)^(3/2)*cos(f*x + e)^3, x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int {\cos \left (e+f\,x\right )}^3\,{\left (a+\frac {b}{{\cos \left (e+f\,x\right )}^2}\right )}^{3/2} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)^3*(a + b/cos(e + f*x)^2)^(3/2),x)

[Out]

int(cos(e + f*x)^3*(a + b/cos(e + f*x)^2)^(3/2), x)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**3*(a+b*sec(f*x+e)**2)**(3/2),x)

[Out]

Timed out

________________________________________________________________________________________